package org.janusproject.acl.protocol;

/**
 * This enumeration describes all available protocols :
 * <ul>
 * <li>FIPA_REQUEST : Request Protocol</li>
 * <li>FIPA_CONTRACT_NET : CNP Contract Net Protocol</li>
 * </ul>
 * <p>
 * Please refer to the following links to get more information about those protocols :
 * <ul>
 * <li><a href="http://www.fipa.org/specs/fipa00026/SC00026H.html">FIPA Request Interaction Protocol Specification</a></li>
 * <li><a href="http://www.fipa.org/specs/fipa00029/SC00029H.html">FIPA Contract Net Interaction Protocol Specification</a></li>
 * </ul>
 * 
 * @author Mickael Adeline
 * @author Kevin Le Roy
 * @author Paul Talagrand
 */
public enum EnumFipaProtocol {

	NONE("none"),
	FIPA_REQUEST("fipa-request"),
	FIPA_CONTRACT_NET("fipa-contract-net");
	
	public final String name;
	
	EnumFipaProtocol(String name) {
		this.name = name;
	}
	
	public String getName() { 
		return name; 
	} 
	
	public static EnumFipaProtocol valueOfByName(String name) throws IllegalArgumentException { 
		for (EnumFipaProtocol value : values()) { 
			if (value.getName().equalsIgnoreCase(name)) { 
				return value; 
			} 
		} 
		return EnumFipaProtocol.NONE; 
	}
}
